package com.mdc.mansion.dataaccess.modules.basedata.entity;

import com.mdc.mansion.dataaccess.common.persistence.BaseEntity;
/**
 * 消息推送持久类
 * @author mingdongc
 * @version 2018-01-21
 */
public class PushMessage extends BaseEntity<PushMessage>{
	private static final long serialVersionUID = 1L;
    private String message;
    private String messageType;
    private String restaurantId;
    private String tags;
    private String alias;
    private Integer messageStatus;
    private Integer sendTimes;

    //creat_time的格式数据
    private String sendTime;
    private String errorReason;

    private Integer businessType;

    public String getMessage(){
        return message;
    }

    public void setMessage(String message){
        this.message=message;
    }

    public String getRestaurantId() {
        return restaurantId;
    }

    public void setRestaurantId(String restaurantId) {
        this.restaurantId = restaurantId;
    }

    public String getMessageType(){
        return messageType;
    }

    public void setMessageType(String messageType){
        this.messageType=messageType;
    }

    public String getTags(){
        return tags;
    }

    public void setTags(String tags){
        this.tags=tags;
    }

    public String getAlias(){
        return alias;
    }

    public void setAlias(String alias){
        this.alias=alias;
    }

    public Integer getMessageStatus(){
        return messageStatus;
    }

    public void setMessageStatus(Integer messageStatus){
        this.messageStatus=messageStatus;
    }

    public Integer getSendTimes(){
        return sendTimes;
    }

    public void setSendTimes(Integer sendTimes){
        this.sendTimes=sendTimes;
    }

    public String getSendTime() {
        return sendTime;
    }

    public void setSendTime(String sendTime) {
        this.sendTime = sendTime;
    }

    public String getErrorReason() {
        return errorReason;
    }

    public void setErrorReason(String errorReason) {
        this.errorReason = errorReason;
    }

    public Integer getBusinessType() {
        return businessType;
    }

    public void setBusinessType(Integer businessType) {
        this.businessType = businessType;
    }

    //消息类型通知notifi、消息mes
    public enum MESSAGE_TYPE{
        NOTIFI("通知","notifi"),
        MES("消息","mes");
        private String name;
        private String val;

        MESSAGE_TYPE(String name, String val) {
            this.name = name;
            this.val = val;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getVal() {
            return val;
        }

        public void setVal(String val) {
            this.val = val;
        }
    }

//    消息状态 0 待发送 1正发送 2 发送成功 3发送失败
    public enum MESSAGE_STATUS{
        WAITE_SEND("待发送",0),
        SEND_ING("发送中",1),
        SEND_SUCCESS("发送成功",2),
        SEND_FAIL("发送失败",3);
        private String name;
        private int val;

        MESSAGE_STATUS(String name, int val) {
            this.name = name;
            this.val = val;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getVal() {
            return val;
        }

        public void setVal(int val) {
            this.val = val;
        }
    }


    //消息类型 0：用户呼叫 1：用户点菜 2：用户催菜 3：上菜 4：缺货 5：恢复供应 6：用户结账
    public enum BUSINESS_TYPE{
        USER_CALL(0,"用户呼叫"),
        USER_ORDER(1,"用户点菜"),
        USER_URGE(2,"用户催菜"),
        SERVE_DISHES(3,"上菜"),
        STOCKOUT(4,"缺货"),
        STOCKIN(5,"恢复供应"),
        USER_CHECKOUT(6,"用户结账");
        private int val;
        private String name;
        BUSINESS_TYPE(int val, String name) {
            this.val = val;
            this.name = name;
        }
        public int getVal() {
            return val;
        }
        public void setVal(int val) {
            this.val = val;
        }
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
    }

}